package demo3;

public class Student {
    private String name;
    private double score;

    //无参构造
    public Student() {

    }
    public Student(String name, double score) {
        this.name = name;
        this.score = score;
    }
    public void setName(String name) {
        this.name = name;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public String getName() {
        return this.name;
    }

    public double getScore() {
        return this.score;
    }

    public void print() {
        System.out.println("姓名: " + this.name + ", 成绩: " + this.score);
    }
}
